package com.newegg.nlp.util.corenlp;

import java.util.HashSet;
import java.util.Set;

public class Result {

	Set<Keyword> keywords = new HashSet<Keyword>();
	Set<String> adjective = new HashSet<String>();
	Set<String> noun = new HashSet<String>();

	public void add(Result result) {
		this.keywords.addAll(result.keywords());
		this.adjective.addAll(result.adjective());
		this.noun.addAll(result.noun);
	}
	
	public void addKeyword(Keyword keyword) {
		this.keywords.add(keyword);
	}
	
	public Set<Keyword> keywords() {
		return keywords;
	}

	public void setKeywords(Set<Keyword> keywords) {
		this.keywords = keywords;
	}

	public Set<String> getAdjective() {
		return adjective;
	}

	public void setAdjective(Set<String> adjective) {
		this.adjective = adjective;
	}

	public Set<String> getNoun() {
		return noun;
	}

	public void setNoun(Set<String> noun) {
		this.noun = noun;
	}

	public void addJJ(String word) {
		adjective.add(word);
	}
	
	public void addNN(String nn) {
		noun.add(nn);
	}
	
	public Set<String> adjective(){
		return adjective;
	}
	
	public Set<String> noun() {
		return noun;
	}

	@Override
	public String toString() {
		return String.format("Result [keywords=%s, adjective=%s, noun=%s]", keywords, adjective, noun);
	}
	
}
